<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="com.power.util.RequestUtil" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	Integer oRid = RequestUtil.getParam(request, "oRid", 0);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=basePath%>resources/css/simulateExtTemplete.css" type="text/css"></link>
<script charset="utf-8" src="../scripts/kindeditor-4.1/kindeditor-min.js"></script>
<script type="text/javascript" src="<%=basePath%>scripts/jquery-1.4.2.js"></script>
<script type="text/javascript" src="<%=basePath%>scripts/apputil.js"></script>
<title>梦房园金融</title>
<style type="text/css">
	html,body{height: 100%;width: 100%;overflow: auto;padding: 0;margin: 0;}
	body{background: url("resources/img/bg.png");}
	div,span,a,li,td{font-family: "宋体";}
	.common_top{height: 50px;line-height: 50px;background:#CF3128;width: 100%;}
	.common_top td{color: #fff;font-size: 14px;font-family: "宋体"}
	.common_top ul,.common_top li{padding: 0;margin: 0;list-style: none;height: 50px;}
	.common_top li{float: left;margin-left: 30px;}
	.common_top li .curr{background: #A81F0E;}
	.common_top li a{font-size: 16px;letter-spacing: 1px;color: #fff;text-decoration: none;height: 50px;line-height: 50px;display: -moz-inline-box;display: inline-block;padding-left: 10px;padding-right: 10px;}
	.common_top .logo{font-size: 18px;font-family: "微软雅黑";font-style: italic;}
	.common_top .f{font-size: 13px;}
	.common_top .f a{margin-right: 15px;text-decoration: none;}
	.common_top .f a:link{color: #fff;}
	.common_top .f a:visited{color: #fff;}
	.common_top .f a:hover {color:#DA9133;text-decoration: underline;}
	.common_w{width: 1024px;}
	.common_w2{width: 764px;}
	.common_w3{width: 240px;}
	.common_split{margin-left: 20px;}
	.common_mp{margin-top: 20px;}
	.hot_p{width: 100%;height: 150px; background: #fff;}
	.zz{width: 100%;background: #fff; height: 50px;}
	.zz span{display: -moz-inline-box;display: inline-block;
		background:#F99C08;color:#fff;
		height: 30px;line-height: 30px;
		width: 105px;margin-top: 10px;margin-left: 20px;font-size: 15px;cursor: pointer;
	}
	.zz span:link{background:#F99C08;}
	.zz span:visited{background:#F99C08;}
	.zz span:hover{background: #F56D01}
	.t1{font-family: "微软雅黑";font-size: 15px;height: 30px;width: 100%;padding-left: 10px;}
	.t1 span{display: -moz-inline-box;display: inline-block;margin-top: 10px ;height: 20px;line-height: 20px;float: left;font-family: "微软雅黑";font-size: 16px;margin-left: 10px;font-weight: 600;}
	.t1 .icon{background: #F27676;width: 20px;}
	.t1 .icon2{background: #6FD3DB;width: 20px;}
	.footer{width: 100%;background: #F3F3F3;height: 100px;clear: both;float: left;border-top: 1px solid #CDCDCD;}
	.footer td{color: #6C6C6C;}
	.footer td a{text-decoration: none; color: #6C6C6C;font-size: 13px;display: -moz-inline-box;display: inline-block;letter-spacing: 1px;}
	.footer td a:link{color: #6C6C6C;}
	.footer td a:visited{color: #6C6C6C;}
	.footer td a:hover {color:#DA9133;text-decoration: underline;}
	.footer table .logo{font-size: 25px;font-weight: 600;font-style: italic;}
	.footer table .copy{font-size: 13px;font-style: italic;}
</style>
<script type="text/javascript" src="scripts/jquery-1.6.1.js"></script>
<script type="text/javascript" src="scripts/jquery.scrollFix.js"></script>
</head>
<body onkeydown="EnterToTab();">
<div class="common_top" align="center">
	<table cellpadding="0" cellspacing="0" class="common_w" border="0">
		<tr><td align="left" class="logo" >梦房园金融</td><td>
		<ul>
			<li><a class="curr"  href="../../rzProject/showProject.action">找项目</a></li>
			<li><a href="../../rzMoneyside/showFunding.action">找资金</a></li>
			<li><a href="#">投资理财</a></li>
		</ul>
		</td><td align="right" class="f"><a href="#">收藏本站</a><a href="#">设为首页</a></td></tr>
	</table>
</div>
<center>
<form id="myForm" name="myForm" method="post" target="tempFrame"
	action="../rzProject/save.action" enctype="multipart/form-data">
	<input type="hidden" value="0" name="obj.sourceType" id="sourceType"/>
	<table width="80%" cellpadding="5" cellspacing="0" border="0" class="tabCls">
		<tr> 
			<td class="titleBack tdT tdL" width="100px;">项目名称:</td>
			<td class="tdL tdT tdR titleBack1" colspan="3">
				<input class="inputCls100_100" id="projectName" name="obj.projectName"  value="<s:property value="obj.projectName" />"  />
			</td>
		</tr>
		<tr>
			<td class="titleBack tdT tdL  ">融资类型:</td>
			<td class="tdL tdT titleBack1" >
				<SELECT id="financingType" name="obj.financingType" onchange="typeChange(this.value);" class="loginInput"></SELECT>
			</td>
			<td class="titleBack tdT tdL  ">项目类型:</td>
			<td class="tdL tdT titleBack1 tdR" >
				<SELECT id="projectType" name="obj.projectType" class="loginInput"></SELECT>
			</td>
		</tr>
		<tr id="hide1"> 
			<td class="titleBack tdT tdL  ">融资主体:</td>
			<td class="tdL tdT titleBack1 " >
				<SELECT id="financingObj" name="obj.financingObj" class="loginInput"></SELECT>
			</td>
			<td class="titleBack tdT tdL  ">所属行业:</td>
			<td class="tdL tdT titleBack1 tdR" >
				<SELECT id="industry" name="obj.industry" class="loginInput"></SELECT>
			</td>
		</tr>
		<tr id="hide2"> 
			<td class="titleBack tdT tdL  ">融资用途:</td>
			<td class="tdL tdT   titleBack1" >
				<input class="inputCls220" id="financingUse" name="obj.financingUse"  value="<s:property value="obj.financingUse" />"   />
			</td>
			<td class="titleBack tdT tdL  ">融资金额:</td>
			<td class="tdL tdT tdR titleBack1" >
				<input class="inputCls220" id="financingSum" name="obj.financingSum"  value="<s:property value="obj.financingSum"/>" />
			</td>
		</tr>
		<tr id="hide3"> 
			<td class="titleBack tdT tdL  ">总投金额:</td>
			<td class="tdL tdT   titleBack1" >
				<input class="inputCls220" id="totalSum" name="obj.totalSum"  value="<s:property value="obj.totalSum" />"   />
			</td>
			<td class="titleBack tdT tdL  ">意向资金:</td>
			<td class="tdL tdT tdR titleBack1" >
				<input class="inputCls220" id="purposeFinancing" name="obj.purposeFinancing"  value="<s:property value="obj.purposeFinancing"/>" />
			</td>
		</tr>
		<tr> 
			<td class="titleBack tdT tdL">联系人:</td>
			<td class="tdL tdT titleBack1">
				<input class="inputCls220" id="linkman" name="obj.linkman"  value="<s:property value="obj.linkman" />"   />
			</td>
			<td class="titleBack tdT tdL ">联系电话:</td>
			<td class="tdL tdT tdR titleBack1" >
				<input class="inputCls220" id="linkphone" name="obj.linkphone"  value="<s:property value="obj.linkphone"/>" />
			</td>
		</tr>
		<tr id="hide5">
			<td class="titleBack tdT tdL  ">融资方式:</td>
			<td class="tdL tdT titleBack1 tdR " colspan="3">
				<SELECT id="financingWay" name="obj.financingWay" class="loginInput"></SELECT>	
			</td>
		</tr>
		<tr id="hide6">
			<td class="titleBack tdT tdL" >所在地区:</td>
			<td class="tdL tdT tdR titleBack1" colspan="3">
				<input class="inputCls100_100" id="place" name="obj.place"  value="<s:property value="obj.place"/>" />
			</td>
		</tr>
		<tr id="hide7">
			<td class="titleBack tdT tdL" >交易类别:</td>
			<td class="tdL tdT   titleBack1" >
				<input class="inputCls220" id="tradeType" name="obj.tradeType"  value="<s:property value="obj.tradeType"/>" />
			</td>
			<td class="titleBack tdT tdL" >交易方式:</td>
			<td class="tdL tdT tdR titleBack1" >
				<input class="inputCls220" id="tradeWay" name="obj.tradeWay"  value="<s:property value="obj.tradeWay"/>" />
			</td>
		</tr>
		<tr id="hide8">
			<td class="titleBack tdT tdL" >转让范围:</td>
			<td class="tdL tdT   titleBack1" >
				<input class="inputCls220" id="transferRange" name="obj.transferRange"  value="<s:property value="obj.transferRange"/>" />
			</td>
			<td class="titleBack tdT tdL" >资产估价:</td>
			<td class="tdL tdT tdR titleBack1" >
				<input class="inputCls220" id="propertyAssess" name="obj.propertyAssess"  value="<s:property value="obj.propertyAssess"/>" />
			</td>
		</tr>
		<tr id="hide9">
			<td class="titleBack tdT tdL" >转让价格:</td>
			<td class="tdL tdT   titleBack1" >
				<input class="inputCls220" id="transferPrice" name="obj.transferPrice"  value="<s:property value="obj.transferPrice"/>" />
			</td>
			<td class="titleBack tdT tdL" >转让截止时间:</td>
			<td class="tdL tdT tdR titleBack1" >
				<input class="inputCls220" id="transferEndtime" name="obj.transferEndtime"  value="<s:property value="obj.transferEndtime"/>" />
			</td>
		</tr>
		<tr id="hide10">
			<td class="titleBack tdT tdL" >招商行业:</td>
			<td class="tdL tdT   titleBack1" >
				<input class="inputCls220" id="merchantsBusiness" name="obj.merchantsBusiness"  value="<s:property value="obj.merchantsBusiness"/>" />
			</td>
			<td class="titleBack tdT tdL" >投资估算:</td>
			<td class="tdL tdT tdR titleBack1" >
				<input class="inputCls220" id="investmentEstimate" name="obj.investmentEstimate"  value="<s:property value="obj.investmentEstimate"/>" />
			</td>
		</tr>
		<tr id="hide11">
			<td class="titleBack tdT tdL" >招商方式:</td>
			<td class="tdL tdT titleBack1 tdR" colspan="3">
				<input class="inputCls100_100" id="merchantsWay" name="obj.merchantsWay"  value="<s:property value="obj.merchantsWay"/>" />
			</td>
		</tr>
		<tr id="hide12">
			<td class="titleBack tdT tdL" >产品类型:</td>
			<td class="tdL tdT tdR titleBack1" colspan="3">
				<input class="inputCls100_100" id="productType" name="obj.productType"  value="<s:property value="obj.productType"/>" />
			</td>
		</tr>
		<tr  id="hide13">
			<td class="titleBack tdT tdL" >风险偏好:</td>
			<td class="tdL tdT   titleBack1" >
				<input class="inputCls220" id="riskPreference" name="obj.riskPreference"  value="<s:property value="obj.riskPreference"/>" />
			</td>
			<td class="titleBack tdT tdL" >投资门槛:</td>
			<td class="tdL tdT tdR titleBack1" >
				<input class="inputCls220" id="investThreshold" name="obj.investThreshold"  value="<s:property value="obj.investThreshold"/>" />
			</td>
		</tr>
		<tr id="hide14">
			<td class="titleBack tdT tdL" >投资期限:</td>
			<td class="tdL tdT   titleBack1" colspan="3">
				<input class="inputCls100_100" id="investDeadline" name="obj.investDeadline"  value="<s:property value="obj.investDeadline"/>" />
			</td>
		</tr>
		<tr>
			<td class="titleBack tdT tdL" >附件：</td>
			<td class="tdL tdT titleBack1 tdR" colspan="3" ><input type="file" name="imgFile" id="img" size="80"/></td>
		</tr>
		<tr>
			<td class="titleBack tdL tdT tdB ">信息概述:</td>
			<td class="tdR tdL tdT tdB" colspan="3">
				<textarea style="width:99%;height:250px;word-wrap:break-word;" name="obj.remark" id="content1"><s:property value="obj.remark" /></textarea>
	    	</td>
		</tr>
	</table>
	<%if(0==oRid){ %>
	<table width="80%" class="tabCls">
		<tr>
			<td align="center">
				<div class="zz">
						<span onclick="checkForm();">保 存</span>
						<span onClick="javascript:window.location.href='../mainPage.jsp';">取 消</span>
				</div>
			</td>
		</tr>
	</table>
	<%} %>
	<iframe id="tempFrame" name="tempFrame" style="display:none;"></iframe>
</form>

</center>
<div class="footer common_mp" align="center">
	<table cellpadding="0" cellspacing="0" class="common_w" height="80%" border="0">
		<tr><td class="logo" width="200px" rowspan="2" valign="middle"><img onclick="window.location.href='http://jr.mymfy.com'" src="../resources/images/mfy/logo.png"></td>
		<td align="left">
		<a href="http://jr.mymfy.com/about.html">关于我们</a>
		<a href="http://jr.mymfy.com/comm.html">联系我们</a>
		<a href="http://jr.mymfy.com/service.html">服务介绍</a>
		<a href="http://jr.mymfy.com/case.html">案例赏析</a>
		</td>
		</tr>
		<tr>
		<td class="copy">Copyright © 2013 mymfy.com All Rights Reserved. 苏ICP备13024701号.</td></tr>
	</table>
</div>
</body>
<script>
	function checkForm(){
		
		var projectName = $("#projectName");
	    if (projectName.val()=="") {
	        alert("请填写项目名称！")
	        projectName.focus();
	        return false;
	    }
	    
		var financingType = $("#financingType");
	    if (financingType.val()=="") {
	        alert("请选择融资类型！")
	        financingType.focus();
	        return false;
	    }
	    
	    var projectType = $("#projectType");
	    if (projectType.val()=="") {
	        alert("请选择项目类型！")
	        projectType.focus();
	        return false;
	    }
	    if($("#financingType").val()=='项目融资'){
		    var financingObj = $("#financingObj");
		    if (financingObj.val()=="") {
		        alert("请选择融资主体！")
		        financingObj.focus();
		        return false;
		    }
	    
		    var industry = $("#industry");
		    if (industry.val()=="") {
		        alert("请选择所属行业！")
		        industry.focus();
		        return false;
		    }
		}
		
		var linkman = $("#linkman");
	    if (linkman.val()=="") {
	        alert("请填写联系人！")
	        linkman.focus();
	        return false;
	    }
	    var linkphone = $("#linkphone");
	    if (linkphone.val()=="") {
	        alert("请填写联系电话！")
	        linkphone.focus();
	        return false;
	    }
	    
	    var financingType = $("#financingType");
	    if (financingType.val()=="") {
	        alert("请选择融资类型！")
	        financingType.focus();
	        return false;
	    }
    	document.forms[0].submit();
	}
	
	function saveResult(items){
		if(items=='y')
			alert('保存成功！');
		else if(items=='n')
			alert('保存失败，请稍候再试！');
		else 
			alert('未知错误，请稍候再试！');
		window.location.href='../mainPage.jsp';
	}
	//资金主体
	var financingObj = '${obj.financingObj}';
	$.get('../dataPlugin/buildJsonData.action?tablename=rzzt',function(mes){
		var mesJson = eval('('+mes+')');
		var disJson = mesJson[0]['result'];
		initSelect('financingObj',disJson,financingObj,function(){});
	})
	//项目类型
	var projectType = '${obj.projectType}';
	$.get('../dataPlugin/buildJsonData.action?tablename=xmlx',function(mes){
		var mesJson = eval('('+mes+')');
		var disJson = mesJson[0]['result'];
		initSelect('projectType',disJson,projectType,function(){});
	})
	//所属行业
	var industry = '${obj.industry}';
	$.get('../dataPlugin/buildJsonData.action?tablename=tzhy',function(mes){
		var mesJson = eval('('+mes+')');
		var disJson = mesJson[0]['result'];
		initSelect('industry',disJson,industry,function(){});
	})
	//融资类型
	var financingType = '${obj.financingType}';
	$.get('../dataPlugin/buildJsonData.action?tablename=rzlx',function(mes){
		var mesJson = eval('('+mes+')');
		var disJson = mesJson[0]['result'];
		initSelect('financingType',disJson,financingType,function(){});
	})
	//融资方式
	var financingWay = '${obj.financingWay}';
	$.get('../dataPlugin/buildJsonData.action?tablename=rzfs',function(mes){
		var mesJson = eval('('+mes+')');
		var disJson = mesJson[0]['result'];
		initSelect('financingWay',disJson,financingWay,function(){});
	})
	var financingTypeval = '${obj.financingType}';
	typeChange(financingTypeval);
	function typeChange(v){
		if(v=='项目融资'){
			$("#hide1").show();
			$("#hide2").show();
			$("#hide3").show();
			$("#hide4").show();
			$("#hide5").show();
			$("#hide6").show();
			
			$("#hide7").hide();
			$("#hide8").hide();
			$("#hide9").hide();
			$("#hide10").hide();
			$("#hide11").hide();
			$("#hide12").hide();
			$("#hide13").hide();
			$("#hide14").hide();
		}
		if(v=='资产交易'){
			$("#hide1").hide();
			$("#hide2").hide();
			$("#hide3").hide();
			$("#hide4").hide();
			$("#hide5").hide();
			
			$("#hide6").show();
			$("#hide7").show();
			$("#hide8").show();
			$("#hide9").show();
			
			$("#hide10").hide();
			$("#hide11").hide();
			$("#hide12").hide();
			$("#hide13").hide();
			$("#hide14").hide();
		}
		if(v=='政府招商'){
			$("#hide1").hide();
			$("#hide2").hide();
			$("#hide3").hide();
			$("#hide4").hide();
			$("#hide5").hide();
			$("#hide6").hide();
			$("#hide7").hide();
			$("#hide8").hide();
			$("#hide9").hide();
			
			$("#hide10").show();
			$("#hide11").show();
			
			$("#hide12").hide();
			$("#hide13").hide();
			$("#hide14").hide();
		}
		if(v=='投资理财'){
			$("#hide1").hide();
			$("#hide2").hide();
			$("#hide3").hide();
			$("#hide4").hide();
			$("#hide5").hide();
			$("#hide6").hide();
			$("#hide7").hide();
			$("#hide8").hide();
			$("#hide9").hide();
			$("#hide10").hide();
			$("#hide11").hide();
			
			$("#hide12").show();
			$("#hide13").show();
			$("#hide14").show();
		}
	}
var editor;
        KindEditor.ready(function(K) {
		               editor = K.create('#content1', {
		               allowFileManager : true,
		               uploadJson : '../scripts/kindeditor-4.1/upload_json.jsp',
				       fileManagerJson : '../scripts/kindeditor-4.1/file_manager_json.jsp',
				          afterBlur:function(){ 
				            this.sync(); 
				        },  
                       items : [
					 	           'preview','source', '|', 'undo', 'redo', '|',  'cut', 'copy', 'paste',
						        'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
						        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
						        'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
						        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
						        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image',
						       'insertfile', 'table', 'hr', 'emoticons', 'map', 'pagebreak',
						        'link', 'unlink'
                  ]
                        
                });
        });
</script>
</html>